package com.zatech.cgnci.project.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * @author user
 */
@Data
@NoArgsConstructor
@ApiModel(value = "CgnciEndorsementInsuranceSaveOrUpdateDTO")
public class CgnciEndorsementInsuranceSaveOrUpdateDTO {

    @ApiModelProperty(value = "工作流类型,固定值:submit")
    private String flowTaskType;

    @ApiModelProperty(value = "任务流程id")
    @NotNull(message = "任务流程id不能为空")
    private Long approvalInfoId;

    @ApiModelProperty("批改信息")
    private CgnciEndorsementInsuranceDTO endorsementInsuranceDTO;

    @ApiModelProperty("业务数据")
    @Valid
    private CgnciBusinessInsuranceSaveOrUpdateDTO businessInsuranceUpdateDTO;


    @Data
    public static class CgnciEndorsementInsuranceDTO {

        @ApiModelProperty("批单id")
        private Long endorsementId;

        @ApiModelProperty("批改生效日期")
        @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT-8")
        private Date effectiveDate;

        @ApiModelProperty("批改申请日期")
        @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT-8")
        private Date applyDate;

        @ApiModelProperty("批改类型")
        private String endorsementType;

        @ApiModelProperty("批改原因(1-客户申请,2-内部操作,3-提供资料错误,4-其他),码表值:endorsementReason")
        private String endorsementReason;

        @ApiModelProperty("备注")
        private String remark;
    }


}
